const path = require("path");
const resolve = dir => path.join(__dirname, dir);
module.exports = {
  publicPath: process.env.NODE_ENV === `production` ? `/dist/` : `/`,
  // assetsDir:resolve('@/assets'),
  productionSourceMap: false,
  outputDir: resolve("/dist"),
  lintOnSave: false,
  devServer: {
    port: 9878,
    open: true,
    overlay: {
      warnings: false,
      errors: false
    },
    proxy: {
      "/api": {
        target: `http://127.0.0.1:3009/api`,
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/api": ``
        }
      }
    }
  },
  configureWebpack: {
    resolve: {
      extensions: [".js", ".vue", ".scss", ".css"],
      alias: {
        "@":resolve("src"),
        components: resolve("src/components"),
        actions: resolve("src/store/actions")

      }
    }
  }
};
